<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>JSCODE</title>
<style>
html{
width:100%;
height:100%;
margin:0;
padding:0;
overflow:hidden;
}
body {
margin:0;
padding:0;
width:100%;
height:100%;
overflow:hidden;
font-size:12px;
font-family:"Andale Mono";
}
#main{
padding:10px 0 0 10px;
height:100%;
overflow:auto;
}
#pop_up{
position:absolute;
right:16px;
top:0;
padding:10px;
background:#fff;
overflow:auto;
border:1px solid #000;
}
dd{
margin-left:20px;
}
h2 a{
color:#006A00;
text-decoration:none;
}
h2 a:hover{
text-decoration:underline;
}
h3{
    color:#aaa;
}
.function_head{
    
}
.variable_head{

}
.example_html b{
    color:#0080C0;
}
p.description {
    border-left:3px solid #aaa;
    border-bottom:1px solid #aaa;
    padding-left:10px;
}
.code{
    border:1px solid #ccc;
    margin-top:5px;
    font-size:11px;
    background:#dedede;
    overflow:auto;
}
dl.item {
    margin-bottom:20px;
}
dl.item dt{
    margin-top:50px;
    background:#eee;
    margin-left:10px;
}
dl.item dt a{
    color:#FF7700;
}
dl.item dt b a{
    font-size:13px;
    color:#333;
    text-decoration:none;
}
dl.item dt b a:hover{
    font-size:13px;
    color:#333;
    text-decoration:underline;
}
li{border-bottom:1px dashed #ccc;line-height:25px}
li b{font-weight:normal}
#name_index{
    border-top:3px solid #ccc;
}
.c128{color:#ff0000}.c512{color:#004000}.c32{color:#008080}.c64{color:#949494}.c2{color:#ff0000}.c8{color:#008000}.c1{color:#0080c0}.c4{color:#ff8040}.c256{color:#000000}.c16{color:#800000}</style>
<script>
function view_source (a) {
    var c = a.parentNode.nextSibling;
    if (c.style.display == 'none') {
        c.style.display = 'block';
    } else {
        c.style.display = 'none';
    }
    return false;
}
</script>
</head>
<body>
<div id="main">
<h2><a name="_$" href="#_$">_$</a></h2><dl><dd><h3>Description:</h3><p class="description"> Dom元素操作封装，实例化：e.g.  <br/>	new _$(element1);  <br/> 	new _$(element1, element2, ...)<br/> 	new _$([element1, element2, ..]);<br/>  通常你不需要直接生成该对象，可通过<a href='base.html#window.$E'>$E</a>及<a href='base.html#window.$'>$</a>函数生成<br/> </p></dd><dl class="item"><dt><b class="function_head"><a name="_$.$" href="#_$.$">$</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c8">$</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">args</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$A</b><b class="c16">(</b><b class="c4">arguments</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c4">index</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">,</b>&nbsp;<b class="c256">ret</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isNumber</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c4">index</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">.</b><b class="c4">shift</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ma</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">.</b><b class="c4">shift</b><b class="c16">(</b><b class="c16">)</b><b class="c8">.</b><b class="c4">match</b><b class="c16">(</b><b class="c512">/^(\$?)(\$?)(.+)$/</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">isMethod</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">!</b><b class="c8">!</b><b class="c256">ma</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">wantRetVal</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">!</b><b class="c8">!</b><b class="c256">ma</b><b class="c8">[</b><b class="c128">2</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">methodOrAttrName</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">ma</b><b class="c8">[</b><b class="c128">3</b><b class="c8">]</b><b class="c16">;</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">wantRetVal</b>&nbsp;&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">undefined</b>&nbsp;&nbsp;<b class="c8">:</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">isMethod</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c64">'_'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">methodOrAttrName</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Dom</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c4">method</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c64">'_'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">methodOrAttrName</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c1">false</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c4">index</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Dom</b><b class="c8">[</b><b class="c4">method</b><b class="c8">]</b><b class="c8">.</b><b class="c4">apply</b><b class="c16">(</b><b class="c1">null</b><b class="c16">,</b>&nbsp;<b class="c8">[</b><b class="c1">this</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c8">]</b><b class="c8">.</b><b class="c4">concat</b><b class="c16">(</b><b class="c256">args</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">Dom</b><b class="c8">[</b><b class="c4">method</b><b class="c8">]</b><b class="c8">.</b><b class="c4">apply</b><b class="c16">(</b><b class="c1">null</b><b class="c16">,</b>&nbsp;<b class="c8">[</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">]</b><b class="c8">.</b><b class="c4">concat</b><b class="c16">(</b><b class="c256">args</b><b class="c16">)</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">ret</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">wantRetVal</b>&nbsp;&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c1">false</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c4">index</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">this</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c8">[</b><b class="c256">methodOrAttrName</b><b class="c8">]</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">2</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">[</b><b class="c256">methodOrAttrName</b><b class="c8">]</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">2</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">ret</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c256">wantRetVal</b>&nbsp;&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//set&nbsp;or&nbsp;get&nbsp;attribute</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c256">undefined</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c1">false</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c4">index</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c4">setAttribute</b>&nbsp;<b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">methodOrAttrName</b>&nbsp;<b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c4">setAttribute</b>&nbsp;<b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">methodOrAttrName</b>&nbsp;<b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c1">false</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c4">index</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c4">getAttribute</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">methodOrAttrName</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c4">getAttribute</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">methodOrAttrName</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">ret</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">ret</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"><br/>	$(elementIndex, attributeName, valueToSetOrLeaveItUndefinedToGetTheAttributeValue)<br/>	$(attributeName, valueToSetOrLeaveItUndefinedToGetTheAttributeValue)<br/>	$(elementIndex, $domMethodName, params)<br/>	$(elementIndex, $$domMethodName, params)<br/>	$($domMethodName, params)<br/>	$($$domMethodName, params) <br/> 	domMethodName : 如果定义了$.Dom['_' + domMethodName]则调用，否则调用元素的domMethodName 方法，前缀$表示是调用方法，$$ 表示要求返回值 示<br/>	如果有返回值的话，个数为1则直接返回，否则返回一个数组</p><h3>Example:</h3><fieldset class="example_html"><legend>Html</legend><br/> 	<b>&lt;div id="foo"&gt;</b><br/> 		<b>&lt;span class="c1"&gt;</b>hello<b>&lt;/span&gt;</b><br/> 		<b>&lt;span class="c2"&gt;</b>world<b>&lt;/span&gt;</b><br/> 		<b>&lt;input type="text" myrel="see" value="so"/&gt;</b><br/> 		<b>&lt;input type="text" value="soso"/&gt;</b><br/> 		<b>&lt;select&gt;</b><br/> 			<b>&lt;option value="1" selected&gt;</b>1<b>&lt;/option&gt;</b><br/> 			<b>&lt;option value="2"&gt;</b>2<b>&lt;/option&gt;</b><br/> 			<b>&lt;option value="3"&gt;</b>3<b>&lt;/option&gt;</b><br/> 		<b>&lt;/select&gt;</b><br/> 	<b>&lt;/div&gt;</b><br/> 	</fieldset><fieldset class="example_code"><legend>Code</legend><ol><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=text]'</b><b class="c16">)</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">value</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//直接通过Dom&nbsp;Element获取&nbsp;'so'</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=text]'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c128">1</b><b class="c16">,</b>&nbsp;<b class="c64">'value'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//通过$方法获取第2个元素的value属性&nbsp;'soso'</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=text]'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'value'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//获取所有元素的value属性['so',&nbsp;'soso']</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=text][0]'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'value'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//如果_$只包含一个元素，则不以数组的形式返回'so'</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=text][@rel]'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'myrel'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//'see'</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=text]'</b><b class="c16">)</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">value</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c64">'change'</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'input[type=text]'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c128">0</b><b class="c16">,</b>&nbsp;<b class="c64">'value'</b><b class="c16">,</b>&nbsp;<b class="c64">'change'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'span.c1'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'$class'</b><b class="c16">,</b>&nbsp;<b class="c64">'+c2'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'class'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//调用$.Dom._class方法,&nbsp;添加新的类样式c2，并返回元素的class属性</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'select[0]'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'value'</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//获取select的选中值</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'select[0]'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'value'</b><b class="c16">,</b>&nbsp;<b class="c128">2</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//设置select的选中项</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">alert</b><b class="c16">(</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'span.c1'</b><b class="c16">)</b><b class="c8">.</b><b class="c8">$</b><b class="c16">(</b><b class="c64">'$class'</b><b class="c16">,</b>&nbsp;<b class="c64">'+c2'</b><b class="c16">)</b><b class="c8">.</b><b class="c256">$$</b><b class="c16">(</b><b class="c64">'$class'</b><b class="c16">,</b>&nbsp;<b class="c64">'c2'</b><b class="c16">)</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c32">//true</b></b></li></ol></fieldset></dd><dt><b class="function_head"><a name="_$.add" href="#_$.add">add</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">add</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">args</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$A</b><b class="c16">(</b><b class="c4">arguments</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">args</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">elements</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">[</b><b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c256">thie</b><b class="c8">.</b><b class="c256">e</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">this</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 添加元素 <br/> </p></dd><dt><b class="function_head"><a name="_$.css" href="#_$.css">css</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">css</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">args</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$A</b><b class="c16">(</b><b class="c4">arguments</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c4">index</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isNumber</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c4">index</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">.</b><b class="c4">shift</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isString</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">!</b>&nbsp;<b class="c8">/</b><b class="c8">:</b><b class="c8">/</b><b class="c8">.</b><b class="c4">test</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c4">index</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">)</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Dom</b><b class="c8">.</b><b class="c256">_style</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Dom</b><b class="c8">.</b><b class="c256">_style</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b>&nbsp;<b class="c16">)</b>&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">ret</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">ret</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">styles</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isString</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">styles</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c16">{</b><b class="c16">}</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">replace</b><b class="c16">(</b><b class="c512">/;$/</b><b class="c16">,</b>&nbsp;<b class="c64">''</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ts</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b><b class="c64">';'</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c256">i</b><b class="c16">,</b>&nbsp;<b class="c256">t</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">ts</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">t</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">ts</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b><b class="c64">':'</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">styles</b><b class="c8">[</b><b class="c256">t</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c256">trim</b><b class="c16">(</b><b class="c16">)</b><b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">t</b><b class="c8">[</b><b class="c128">1</b><b class="c8">]</b><b class="c8">.</b><b class="c256">trim</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">else</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">styles</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c4">index</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Dom</b><b class="c8">.</b><b class="c256">_style</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">styles</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Dom</b><b class="c8">.</b><b class="c256">_style</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">styles</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> <br/> css(elementIndex, styleNameWantToGet)<br/> css(elementIndex, styleStringOrStyleObjectWantToSet)<br/> css(styleNameWantToGet)<br/> css(styleStringOrStyleObjectWantToSet)<br/> 如果有返回值， 个数为1则直接返回，否则返回数组<br/> </p></dd><dt><b class="function_head"><a name="_$.each" href="#_$.each">each</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">each</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">f</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">try</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c1">try</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c256">f</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c256">i</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c16">}</b>&nbsp;<b class="c1">catch</b>&nbsp;<b class="c16">(</b><b class="c256">e</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">e</b>&nbsp;<b class="c8">!</b><b class="c8">=</b>&nbsp;<b class="c256">$continue</b><b class="c16">)</b>&nbsp;<b class="c1">throw</b>&nbsp;<b class="c256">e</b><b class="c16">;</b><b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;<b class="c1">catch</b>&nbsp;<b class="c16">(</b><b class="c256">e</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">e</b>&nbsp;<b class="c8">!</b><b class="c8">=</b>&nbsp;<b class="c256">$break</b><b class="c16">)</b>&nbsp;<b class="c1">throw</b>&nbsp;<b class="c256">e</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  遍历所有元素</p></dd><dt><b class="function_head"><a name="_$.event bind" href="#_$.event bind">event bind</a></b>&nbsp;</dt><dd><h3>Description:</h3><p class="description"> _$实例对象事件绑定方法，事件内型在<a href='base.html#window.$events'>$events</a>定义,<br/> 第一个参数为事件处理函数，如果定义了第二个参数的话则为true，则将事件函数的执行上下文绑定在Dom元素对象上</p><h3>Example:</h3><fieldset class="example_code"><legend>Code</legend><ol><li><b class="c8">$</b><b class="c16">(</b><b class="c64">'#id'</b><b class="c16">)</b><b class="c8">.</b><b class="c4">click</b><b class="c16">(</b><b class="c1">function</b><b class="c16">(</b><b class="c16">)</b><b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">alert</b><b class="c16">(</b><b class="c1">this</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//firefox&nbsp;this引用Dom元素本身，ie6引用的是window&nbsp;&nbsp;&nbsp;&nbsp;</b></li><li>&nbsp;<b class="c16">}</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#id'</b><b class="c16">)</b><b class="c8">.</b><b class="c4">click</b><b class="c16">(</b><b class="c1">function</b><b class="c16">(</b><b class="c16">)</b><b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">alert</b><b class="c16">(</b><b class="c1">this</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//引用Dom元素</b></li><li>&nbsp;<b class="c16">}</b><b class="c16">,</b>&nbsp;<b class="c1">true</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;</li><li>&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'#id'</b><b class="c16">)</b><b class="c8">.</b><b class="c256">$click</b><b class="c16">(</b><b class="c256">handler</b><b class="c16">)</b><b class="c16">;</b>&nbsp;<b class="c32">//解除绑定事件</b></b></li></ol></fieldset></dd><dt><b class="function_head"><a name="_$.fill" href="#_$.fill">fill</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">fill</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">url</b><b class="c16">,</b>&nbsp;<b class="c256">sets</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">_t</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">sets</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">sets</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c16">{</b><b class="c16">}</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">sets</b><b class="c8">.</b><b class="c256">preCall</b><b class="c16">)</b>&nbsp;<b class="c256">sets</b><b class="c8">.</b><b class="c256">preCall</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c64">'url:'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c256">url</b><b class="c16">,</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c4">method</b><b class="c8">:</b>&nbsp;<b class="c64">'get'</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">onSuccess</b><b class="c8">:</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c256">t</b><b class="c16">,</b>&nbsp;<b class="c256">json</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">_t</b><b class="c8">.</b><b class="c4">length</b><b class="c16">)</b>&nbsp;<b class="c256">_t</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">innerHTML</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">sets</b><b class="c8">.</b><b class="c256">process</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">sets</b><b class="c8">.</b><b class="c256">process</b><b class="c16">(</b><b class="c256">t</b><b class="c8">.</b><b class="c256">responseText</b><b class="c16">,</b>&nbsp;<b class="c256">json</b><b class="c16">)</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">t</b><b class="c8">.</b><b class="c256">responseText</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">(</b><b class="c256">sets</b><b class="c8">.</b><b class="c256">sufCall</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">empty</b><b class="c16">)</b><b class="c8">.</b><b class="c256">bind</b><b class="c16">(</b><b class="c256">_t</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">,</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">onFailure</b><b class="c8">:</b>&nbsp;<b class="c1">function</b>&nbsp;<b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">_t</b><b class="c8">.</b><b class="c4">length</b><b class="c16">)</b>&nbsp;<b class="c256">_t</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">innerHTML</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">sets</b><b class="c8">.</b><b class="c256">failedText</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c64">'Fail&nbsp;to&nbsp;Load&nbsp;data'</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">(</b><b class="c256">sets</b><b class="c8">.</b><b class="c256">sufCall</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">empty</b><b class="c16">)</b><b class="c8">.</b><b class="c256">bind</b><b class="c16">(</b><b class="c256">_t</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  调用一个Ajax请求，并将请求结果字符写入该元素中<br/> </p></dd><dt><b class="function_head"><a name="_$.find" href="#_$.find">find</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c4">find</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c8">$</b><b class="c16">(</b><b class="c4">arguments</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">elements</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  以当前的元素为根，查找相关元素，参数为元素选择串，返回<a href='class.html#_$'>_$</a>对象<br/> </p></dd><dt><b class="function_head"><a name="_$.html" href="#_$.html">html</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">html</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">args</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">$A</b><b class="c16">(</b><b class="c4">arguments</b><b class="c16">)</b><b class="c16">,</b>&nbsp;<b class="c4">index</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">$</b><b class="c8">.</b><b class="c256">isNumber</b><b class="c16">(</b><b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c4">index</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">.</b><b class="c4">shift</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">args</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">ret</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">[</b><b class="c8">]</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c4">index</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b><b class="c16">(</b><b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c8">.</b><b class="c4">innerHTML</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c4">index</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c8">.</b><b class="c4">innerHTML</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">push</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">.</b><b class="c4">innerHTML</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c256">ret</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">?</b>&nbsp;<b class="c256">ret</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b>&nbsp;<b class="c8">:</b>&nbsp;<b class="c256">ret</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c256">args</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c128">1</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c4">index</b>&nbsp;<b class="c8">!</b><b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c1">false</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b>&nbsp;<b class="c8">&</b><b class="c8">&</b>&nbsp;<b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c4">index</b><b class="c8">]</b><b class="c8">.</b><b class="c4">innerHTML</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c8">.</b><b class="c4">innerHTML</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">args</b><b class="c8">[</b><b class="c128">0</b><b class="c8">]</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c16">;</b>&nbsp;&nbsp;&nbsp;&nbsp;</li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> <br/> html(elementIndex)<br/> html(elementIndex, htmlStringWantToSet)<br/> html()<br/> html(htmlStringWantToSet)<br/> 如果有返回值， 个数为1则直接返回，否则返回数组<br/> </p></dd><dt><b class="function_head"><a name="_$.item" href="#_$.item">item</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">item</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c256">i</b><b class="c16">)</b>&nbsp;<b class="c16">{</b>&nbsp;<b class="c1">return</b>&nbsp;<b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b>&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description">  返回第i个html element<br/> </p></dd><dt><b class="function_head"><a name="_$.quickCallDomMethod" href="#_$.quickCallDomMethod">quickCallDomMethod</a></b>&nbsp;</dt><dd><h3>Description:</h3><p class="description"> _$实例对象提供对第一个元素Dom操作的简便入口<br/> </p></dd><dt><b class="function_head"><a name="_$.unbind" href="#_$.unbind">unbind</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c256">_$</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">unbind</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b><b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b><b class="c16">)</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c2">Event</b><b class="c8">.</b><b class="c256">stopObserving</b><b class="c16">(</b><b class="c1">this</b><b class="c8">[</b><b class="c256">i</b><b class="c8">]</b><b class="c16">)</b><b class="c16">;</b></li><li><b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd><h3>Description:</h3><p class="description"> 取消元素绑定的所有事件<br/> </p></dd></dl></dl><h2><a name="$.Cookie" href="#$.Cookie">$.Cookie</a></h2><dl><dd></dd><dl class="item"><dt><b class="function_head"><a name="$.Cookie.load" href="#$.Cookie.load">load</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Cookie</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c4">load</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">cookieval</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Cookie</b><b class="c8">.</b><b class="c256">All</b><b class="c8">.</b><b class="c4">get</b><b class="c16">(</b><b class="c1">this</b><b class="c8">.</b><b class="c256">$document</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$name</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c8">!</b><b class="c256">cookieval</b><b class="c16">)</b>&nbsp;<b class="c1">return</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">a</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">cookieval</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b>&nbsp;<b class="c64">'&'</b>&nbsp;<b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b><b class="c16">(</b>&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">a</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b>&nbsp;<b class="c16">)</b>&nbsp;<b class="c256">a</b><b class="c8">[</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">a</b><b class="c8">[</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">]</b><b class="c8">.</b><b class="c4">split</b><b class="c16">(</b>&nbsp;<b class="c64">':'</b>&nbsp;<b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b><b class="c16">(</b>&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c128">0</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8"><</b>&nbsp;<b class="c256">a</b><b class="c8">.</b><b class="c4">length</b><b class="c16">;</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">+</b><b class="c8">+</b>&nbsp;<b class="c16">)</b>&nbsp;<b class="c1">this</b><b class="c8">[</b>&nbsp;<b class="c256">a</b><b class="c8">[</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">]</b><b class="c8">[</b>&nbsp;<b class="c128">0</b>&nbsp;<b class="c8">]</b>&nbsp;<b class="c8">]</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c256">a</b><b class="c8">[</b>&nbsp;<b class="c256">i</b>&nbsp;<b class="c8">]</b><b class="c8">[</b>&nbsp;<b class="c128">1</b>&nbsp;<b class="c8">]</b><b class="c8">.</b><b class="c256">decode</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">return</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.Cookie.remove" href="#$.Cookie.remove">remove</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Cookie</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">remove</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Cookie</b><b class="c8">.</b><b class="c256">All</b><b class="c8">.</b><b class="c256">remove</b><b class="c16">(</b><b class="c1">this</b><b class="c8">.</b><b class="c256">$document</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$name</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$path</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$domain</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd><dt><b class="function_head"><a name="$.Cookie.store" href="#$.Cookie.store">store</a></b>&nbsp;<a href="javascript:void(0)" onclick="view_source(this)">hide source</a></dt><dd class="code" style="display:block"><ol><li><b class="c8">$</b><b class="c8">.</b><b class="c256">Cookie</b><b class="c8">.</b><b class="c4">prototype</b><b class="c8">.</b><b class="c256">store</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c1">function</b><b class="c16">(</b><b class="c16">)</b>&nbsp;<b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">var</b>&nbsp;<b class="c256">cookieval</b>&nbsp;<b class="c8">=</b>&nbsp;<b class="c64">""</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">for</b>&nbsp;<b class="c16">(</b><b class="c1">var</b>&nbsp;<b class="c256">prop</b>&nbsp;<b class="c1">in</b>&nbsp;<b class="c1">this</b><b class="c16">)</b><b class="c16">{</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b><b class="c16">(</b>&nbsp;<b class="c256">prop</b><b class="c8">.</b><b class="c4">charAt</b><b class="c16">(</b>&nbsp;<b class="c128">0</b>&nbsp;<b class="c16">)</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'$'</b>&nbsp;<b class="c16">)</b>&nbsp;<b class="c8">|</b><b class="c8">|</b>&nbsp;<b class="c16">(</b><b class="c16">(</b>&nbsp;<b class="c4">typeof</b>&nbsp;<b class="c1">this</b><b class="c8">[</b>&nbsp;<b class="c256">prop</b>&nbsp;<b class="c8">]</b>&nbsp;<b class="c16">)</b>&nbsp;<b class="c8">=</b><b class="c8">=</b>&nbsp;<b class="c64">'function'</b>&nbsp;<b class="c16">)</b><b class="c16">)</b>&nbsp;<b class="c1">continue</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c1">if</b>&nbsp;<b class="c16">(</b>&nbsp;<b class="c256">cookieval</b>&nbsp;<b class="c8">!</b><b class="c8">=</b>&nbsp;<b class="c64">""</b>&nbsp;<b class="c16">)</b>&nbsp;<b class="c256">cookieval</b>&nbsp;<b class="c8">+</b><b class="c8">=</b>&nbsp;<b class="c64">'&'</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c256">cookieval</b>&nbsp;<b class="c8">+</b><b class="c8">=</b>&nbsp;<b class="c256">prop</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c64">':'</b>&nbsp;<b class="c8">+</b>&nbsp;<b class="c1">this</b><b class="c8">[</b><b class="c256">prop</b><b class="c8">]</b><b class="c8">.</b><b class="c256">encode</b><b class="c16">(</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b class="c8">$</b><b class="c8">.</b><b class="c256">Cookie</b><b class="c8">.</b><b class="c256">All</b><b class="c8">.</b><b class="c256">set</b><b class="c16">(</b><b class="c1">this</b><b class="c8">.</b><b class="c256">$document</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$name</b><b class="c16">,</b>&nbsp;<b class="c256">cookieval</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$days</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$path</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$domain</b><b class="c16">,</b>&nbsp;<b class="c1">this</b><b class="c8">.</b><b class="c256">$secure</b><b class="c16">)</b><b class="c16">;</b></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<b class="c16">}</b><b class="c16">;</b></b></li></ol></dd><dd></dd></dl></dl><h2><a name="$.Json" href="#$.Json">$.Json</a></h2><dl><dd><h3>Description:</h3><p class="description"> 用于与服务器进行JSON数据交互，运用于数据驱动应用及解决Ajax跨域问题<br/> </p></dd></dl><h2><a name="$.Ajax.Simple" href="#$.Ajax.Simple">$.Ajax.Simple</a></h2><dl><dd></dd></dl><div id="name_index"><h3><a name="#name_index">名称索引</a><dl><dt><a href='#_$'>_$</a></dt><dd><a href='#_$.$'>$</a></dd><dd><a href='#_$.add'>add</a></dd><dd><a href='#_$.css'>css</a></dd><dd><a href='#_$.each'>each</a></dd><dd><a href='#_$.event bind'>event bind</a></dd><dd><a href='#_$.fill'>fill</a></dd><dd><a href='#_$.find'>find</a></dd><dd><a href='#_$.html'>html</a></dd><dd><a href='#_$.item'>item</a></dd><dd><a href='#_$.quickCallDomMethod'>quickCallDomMethod</a></dd><dd><a href='#_$.unbind'>unbind</a></dd></dl><dl><dt><a href='#$.Cookie'>$.Cookie</a></dt><dd><a href='#$.Cookie.load'>load</a></dd><dd><a href='#$.Cookie.remove'>remove</a></dd><dd><a href='#$.Cookie.store'>store</a></dd></dl><dl><dt><a href='#$.Json'>$.Json</a></dt></dl><dl><dt><a href='#$.Ajax.Simple'>$.Ajax.Simple</a></dt></dl></h3></div><div id="pop_up"><a href="#name_index">查看名称索引</a></div></div>
</body>
</html>
